package com.meme.editor.model.sprite2d;

import org.apache.log4j.Logger;

import com.meme.editor.EntityObject;

public class AnimatedModuleGroup extends EntityObject 
{
	static Logger logger = Logger.getLogger (AnimatedModuleGroup.class);

	public AnimatedModuleGroup ()
	{
		this (null);
	}
	
	public AnimatedModuleGroup (String name)
	{
		super (name);
		
		// build property manager
	}
	
	public AnimatedModule createNewAnimatedModule ()
	{
		addNewChild ();
		
		return (AnimatedModule) getChildByIndex (getChildrenCount () - 1);
	}
	
	@Override
	public String getDefaultName ()
	{
		return "Animated Module Group";
	}
	
	@Override
	protected boolean isValidChild (EntityObject entity)
	{
		return entity instanceof AnimatedModule;
	}
	
	@Override
	public EntityObject insertNewChild (int insertPos)
	{
		AnimatedModule instance = new AnimatedModule ();
		
		return insertChild (instance, insertPos);
	}
}
